#pragma once

#include "Tile.h"
#include <vector>

class Camera;


class TileEngine{
	
	unsigned int ROWS;
	unsigned int COLS;

		//	Textures
	SGD::HTexture _grass = SGD::INVALID_HANDLE;
	SGD::HTexture _blueflower = SGD::INVALID_HANDLE;
	SGD::HTexture _sand = SGD::INVALID_HANDLE;		

	SGD::Size m_worldSize;
	
		//	Tiles
	std::vector<Tile*> m_tiles;

	Camera* m_camera;

public:
	TileEngine();
	~TileEngine();

	void Update(float elapsedtime);
	void Render();

	void LoadMap(const char* filename);
	void SaveTestFile();

	SGD::Size GetWorldSize(){ return m_worldSize; }
	void SetWorldSize(SGD::Size size){ m_worldSize = size; }

	Camera* GetCamera(){ return m_camera; }

	SGD::HTexture GetGrass(){ return _grass; }

	std::vector<Tile*> GetTilesVec(){ return m_tiles; }
};